import java.util.Scanner;
import java.util.Set;
import java.util.HashSet;

public class UniqueNumbers {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入数据组的大小: ");
        int n = scanner.nextInt();

        int[] numbers = new int[n];
        System.out.println("请输入数据组的元素:");
        for (int i = 0; i < n; i++) {
            numbers[i] = scanner.nextInt();
        }

        Set<Integer> uniqueNumbers = new HashSet<>();
        for (int num : numbers) {
            uniqueNumbers.add(num);
        }

        System.out.println("数据组中不同的元素为：");
        for (int unique : uniqueNumbers) {
            System.out.print(unique + " ");
        }
    }
}

